-- GENERATED SPELL FOR [Sunblade Cabalist] --


function spell0_25363(pUnit, Event) --@Ignite Mana,n/a--
pUnit:FullCastSpellOnTarget(46543,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_25363', 13000, 1)
end

function spell1_25363(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(47248,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_25363', 1500, 1)
end

function spell2_25363(pUnit, Event) --@Summon Imp,Self--
pUnit:FullCastSpellOnTarget(46544,pUnit)
pUnit:RegisterEvent('Sorts_25363', 637, 1)
end

function Sorts_25363(pUnit, Event)
local choix_sorts_25363 = math.random(0, 2)
if choix_sorts_25363 == 0 then
pUnit:RegisterEvent('spell0_25363', 1, 1)
end
if choix_sorts_25363 == 1 then
pUnit:RegisterEvent('spell1_25363', 1, 1)
end
if choix_sorts_25363 == 2 then
pUnit:RegisterEvent('spell2_25363', 1, 1)
end
end

function mob25363_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_25363', math.random(1500, 3000), 1)
end

function mob25363_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob25363_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob25363_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(25363, 1, 'mob25363_Action')
RegisterUnitEvent(25363, 2, 'mob25363_Leave')
RegisterUnitEvent(25363, 3, 'mob25363_Kill')
RegisterUnitEvent(25363, 4, 'mob25363_Die')
